<!DOCTYPE html>
<html>
    <head>
        <script src="js/vue.js"></script>
    </head>
    <body>
        <div id="app">
            {{msg}}
        </div>
        <script>
            var vm = new Vue({
                el:'#app',
                data:{ msg : '张三'},
                beforeCreate() {
                    console.log('实例创建之前!');
                    console.log(this);
                    console.log(this.$data);
                    console.log(this.$data.msg);
                },
                created() {
                    console.log('实例创建之后!');
                    console.log(this.$data);
                    console.log(this.$data.msg);
                }
            });
        </script>
    </body>
</html>